# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1317925320.6688571
_template_filename='/home/kenshuri/c_chrysalide/trunk/portal/portal/templates/compagnie/programmation.mako'
_template_uri='/compagnie/programmation.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['title']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/index.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        programmation_list = context.get('programmation_list', UNDEFINED)
        c = context.get('c', UNDEFINED)
        spec = context.get('spec', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        __M_writer(u'\n')
        # SOURCE LINE 3

        def print_programmation(programmation):
                spec="""
			<div id="spec_list_pag" align="center">
				<p class="spectacles_title"><a href="/programmation/view/%s">%s</a></p>
				<p class="spectacles_content">%s</p>
			</div>
			
		""" % (programmation.id, programmation.title, programmation.content)
                return spec
                
        def print_programmation_list(programmations):
                programmation_list = '<p style="color: white;">Liste des Programmations</p>'
                for programmation in programmations:
                        programmation_list = programmation_list+ """
											<p>
												<span id="hi_%s">%s</span>
											</p>
											 """ % (programmation.id, programmation.title)	
                
                return "<div id='spec_list'>%s</div>" % programmation_list
        
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['print_programmation_list','print_programmation'] if __M_key in __M_locals_builtin_stored]))
        # SOURCE LINE 24
        __M_writer(u'\t\n<div>\n\t\n\t\t')
        # SOURCE LINE 27
        __M_writer(print_programmation_list(c.programmations) )
        __M_writer(u'\n\t\n\t<div style="float: left; width: 680px" align="left">\n')
        # SOURCE LINE 30
        for programmation in c.programmations:
            # SOURCE LINE 31
            __M_writer(u'\t\t\t')
            __M_writer(print_programmation(programmation) )
            __M_writer(u'\n')
            pass
        # SOURCE LINE 33
        __M_writer(u'\t</div>\n\t<div style="clear: both;"></div>\n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_title(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'Programmation')
        return ''
    finally:
        context.caller_stack._pop_frame()


